﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Programas.aspx.vb" Inherits="DatosBasicos_Programas_Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    
    <style type="text/css">
        .style1
        {
            width: 127px;
        }
        .style2
        {
            width: 247px;
        }
    </style>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <div class="Cuerpo">
    <asp:Label ID="Label1" runat="server" CssClass="Titulo" 
        Text="Gestión de Facultades"></asp:Label>

    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="1">
                <asp:View ID="View1" runat="server">
                <br />
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                        ValidationGroup="Guardar" SkinID="ValidationSummary1" />
                        <br />

                        <table width="100%">
                            <thead>
                                <tr>
                                    <td class="style12" colspan="6">
                                        Datos de la facultad</td>
                                </tr>
                            </thead>
                            <thead>
                                <tr>
                                    <th class="style13">
                                        CÓDIGO<th class="style13">
                                            Código del programa<th class="style13">
                                                nombre del programa</th>
                                        </th>
                                    </th>
                                    <th class="style13">
                                        NOMBRE SENA</th>
                                    <th class="style13">
                                        RESOLUCIÓN APROBACIÓN</th>
                                    <th class="style13">
                                        &nbsp;</th>
                                </tr>
                            </thead>
                            <tr>
                                <th class="style14">
                                    <telerik:RadComboBox ID="CmbFacultad" Runat="server" Skin="WebBlue" 
                                     DataSourceID="ObjFac" DataTextField="Nom_Facultad" 
                                     DataValueField="Cod_Facultad" AutoPostBack="True">
                                 </telerik:RadComboBox>
                                 <asp:ObjectDataSource ID="ObjFac" runat="server" 
                                     OldValuesParameterFormatString="original_{0}" SelectMethod="GetRecords" 
                                     TypeName="Facultades"></asp:ObjectDataSource></th>
                                <th class="style14">
                                    <asp:TextBox ID="TxtCod" runat="server" MaxLength="3"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="TxtCod" ErrorMessage="Debe digitar el Codigo" 
                                        ValidationGroup="Guardar" ForeColor="Red">*</asp:RequiredFieldValidator>
                                </th>
                                <th class="style15">
                                    <asp:TextBox ID="TxtNom" runat="server" Width="200px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                        ControlToValidate="TxtNom" ErrorMessage="debe digitar el nombre" 
                                        ValidationGroup="Guardar" ForeColor="Red">*</asp:RequiredFieldValidator>
                                </th>
                                <th class="style15">
                                    <asp:TextBox ID="TxtNomSena" runat="server" Width="200px"></asp:TextBox>
                                </th>
                                <th class="style15">
                                    <asp:TextBox ID="TxtRes" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                        ControlToValidate="TxtRes" 
                                        ErrorMessage="Debe proporsionar la resolución de aprobación" ForeColor="Red" 
                                        ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
                                </th>
                                <th class="style15">
                                    <asp:CheckBox ID="ChkSena" runat="server" Text="SENA" />
                                </th>
                            </tr>
                            <tr>
                                <th class="style14">
                                    &nbsp;</th>
                                <th class="style14">
                                    &nbsp;</th>
                                <th class="style15">
                                    &nbsp;</th>
                                <th class="style15">
                                    &nbsp;</th>
                                <th class="style15">
                                    &nbsp;</th>
                                <th class="style15">
                                    &nbsp;</th>
                            </tr>
                            <tr>
                                <th class="style14">
                                    &nbsp;</th>
                                <th class="style14">
                                    &nbsp;</th>
                                <th class="style15">
                                    <asp:Button ID="BtnGuardar" runat="server" Text="Guardar" 
                                        ValidationGroup="Guardar" />
                                    <asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" />
                                    <asp:Button ID="BtnCancel" runat="server" Text="Cancelar" />
                                </th>
                                <th class="style15">
                                    &nbsp;</th>
                                <th class="style15">
                                    &nbsp;</th>
                                <th class="style15">
                                    &nbsp;</th>
                            </tr>
                            <tr>
                                <td style="text-align:center;">
                                    &nbsp;</td>
                            </tr>
                    </table>
                </asp:View>
                <asp:View ID="View2" runat="server">
                <br />
                    <table style="width:100%;">
                        <tr>
                            <td class="style1">
                                &nbsp;</td>
                            <td class="style2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Buscar</td>
                            <td class="style2">
                                <asp:TextBox ID="TxtNom0" runat="server" Width="241px"></asp:TextBox>
                            </td>
                            <td>
                                <asp:ImageButton ID="ImageButton1" runat="server" Height="32px" 
                                    ImageUrl="~/Imagenes/search.png" Width="32px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                <asp:LinkButton ID="LinkButton1" runat="server" Width="105px">Nueva facultad</asp:LinkButton>
                            </td>
                            <td class="style2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                    <br />
                    <asp:Label ID="Msg" runat="server"></asp:Label>
                    <br />
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" ForeColor="#333333" GridLines="None" Width="980px" 
                        DataKeyNames="Cod_Facultad,Cod_Programa" DataSourceID="ObjFacultades" 
                        SkinID="gridView" EnableSortingAndPagingCallbacks="True">
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:BoundField DataField="Nom_Facultad" HeaderText="Facultad" SortExpression="Nom_Facultad" />
                            <asp:BoundField DataField="Cod_programa" HeaderText="Código del Programa" SortExpression="Cod_programa" />
                            <asp:BoundField DataField="Nom_Programa" HeaderText="Programa" />
                            <asp:BoundField DataField="Resolucion" HeaderText="Resolución Aprobación" />
                            <asp:BoundField DataField="Ent_Aprueba" HeaderText="Entidad que Aprueba" />
                            <asp:ButtonField CommandName="Editar" Text="Editar" ButtonType="Image" 
                                ImageUrl="~/Imagenes/Editar.png" />
                            <asp:ButtonField CommandName="Eliminar" Text="Eliminar" ButtonType="Image" 
                                ImageUrl="~/Imagenes/remove.png" />
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjFacultades" runat="server" 
                        SelectMethod="consultar" TypeName="Programas" 
                        OldValuesParameterFormatString="original_{0}">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="TxtNom0" Name="busc" PropertyName="Text" 
                                Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                    <asp:HiddenField ID="HfOper" runat="server" />
                    <asp:HiddenField ID="HfPK" runat="server" />
                    <br />
            </asp:View>
            </asp:MultiView>
            
        </ContentTemplate>
    </asp:UpdatePanel>

</div>
    
</asp:Content>

